//
//  SendFactory.m
//  LearnObjectiveC
//
//  Created by client on 2017/9/12.
//  Copyright © 2017年 吴可高. All rights reserved.
//

#import "SendFactory.h"
#import "MailSender.h"
#import "MSMSender.h"

@implementation SendFactory

-(Sender*)product:(NSString*)type;
{
    if ([type isEqualToString:@"mail"]) {
        return  [[MailSender alloc]init];
    }
    else if ([type isEqualToString:@"sms"])
    {
        return [[MSMSender alloc]init];
    }
    else
    {
        NSLog(@"请输入正确类型");
        return nil;
    }
}

@end
